package org.principles.demo3.after;

/**
 * 依赖倒转原则（正确）
 *
 */
public class ComputerDome {
    public static void main(String[] args) {
        Computer computer = new Computer();

        Cpu cpu = new IntelCpu();
        Memory memory = new KingstonMemory();
        HarDisk harDisk = new XiJieHardDisk();

        computer.setCpu(cpu);
        computer.setMemory(memory);
        computer.setHarDisk(harDisk);

        computer.run();
    }
}
